<div class="pro_detail">
    <div class="hearders">
        <a onclick="$.ui.goBack()" class="goprev"></a>
        <i class="icon pro_img_prev" onclick="mySwipe.prev()"></i>
        <div id="mySwipe" style='margin:0 auto' class='swipe pro_swipe'>
            <div class="swipe-wrap messagewrap" id="id_production_img">
                <!-- <div><img src="images/p_p_b.png"></div>  
                <div><img src="images/p_p_b.png"></div> 
                <div><img src="images/p_p_b.png"></div> -->                             
            </div>
            <section>
                <h3 id="id_production_name"></h3>
                <span id="id_production_price"></span>
            </section>
         </div>
         <i class="icon pro_img_next" onclick="mySwipe.next()"></i>
         <!--<section>
            <h2>许愿宣言:</h2>
            <textarea placeholder="在这留着什么话吧"></textarea>            
         </section>-->                         
     </div>
     <a class="icon pro_detail">产品详情</a>
     <ul class="pro_plist_detail" id="id_pro_plist_detail"></ul>
     <div class="clear"></div>
</div>
     <a class="button add_tree">添加到心愿树</a>
     <a class="button now_wish" data-transition="up" href="#tree">立即许愿</a>
<script>
$(document).ready(function(){
	$("a.pro_detail").click(function(){
		$(this).parent().find(".pro_plist_detail").toggle();
	})
	
	$.ajax({ 
        type: "get",
        async: false, 
        url: baseUrl + "/json/wishwall/production_queryProductionById", 
        dataType: "json", 
        data: "productionId="+ $("#id_productionId").val(),
        error: function (XMLHttpRequest, textStatus, errorThrown) { 
            alert(errorThrown); 
        },
        success: function (data) {
        	var production = data;
        	$("#id_production_img").html("<div><img src='"+production.img1Url+"'></div>");
        	$("#id_production_name").html(production.name);
        	$("#id_production_price").html(production.price);
        	$("#id_pro_plist_detail").html(production.description);
        } 
	});
});
function details_swiper(){
	var elem = document.getElementById('mySwipe');
	window.mySwipe = Swipe(elem, {
	});	
}
details_swiper();
window.setInterval(function(){
	if($("#mySwipe .swipe-wrap").width()==0){
		details_swiper();				  
	}
}, 200);
</script>